// var _api_root = 'https://helton.atakeoff.cn/index.php/api/'; //线上测试机
var _api_root = 'https://hilton.tkkks.com/index.php/api/';   //正式线上服务器
// var _api_root = 'http://www.helton.com/index.php/api/';      //本地测试
var api = {
    // 首页
    index: _api_root + 'index/index',
    default: {
        index: _api_root + 'default/index',
        // goods: _api_root + 'default/goods',
        district: _api_root + 'default/district',
        goods_attr_info: _api_root + "goods/goodsAttrInfo",
        upload_image: _api_root + "default/upload-image",
        // 商品详情
        goods:_api_root+'goods/goodsDetail',
        // 提交商品信息
        buy:_api_root+'goods/buyNow',
        // 商品列表
        goods_list: _api_root + 'Goods/goodsList',
        // 资讯列表
        news_list: _api_root + 'Article/articleList',
        // 文章详情
        news_detail: _api_root + 'Article/articleDetail',
        // 个人设置
        userInfoSet: _api_root + 'User/setting',
        // 账单列表
        bill_list: _api_root + 'User/myMoneyLog',
        // 账单详情
        bill_detail: _api_root + 'User/moneyLogDetail',
        // 我的团队
        my_team: _api_root + 'User/myTeam',
        // 绑定手机
        bind_myMobile: _api_root + 'User/bindMobile',
        // 提现展示和限制   提交提现
        rules_withdrawals: _api_root + 'user/withdrawals',
        // 余额账单列表
        myMoneyLog: _api_root + 'User/myMoneyLog',
    },
    cart: {
        list: _api_root + 'cart/index',
        add_cart: _api_root + 'cart/addCart',
        delete: _api_root + 'cart/delete',
        change_num: _api_root + 'cart/changeNum',
        update_cart: _api_root + 'cart/asyncUpdateCart',
    },
    passport: {
        login: _api_root + 'passport/login',
        on_login: _api_root + 'passport/on-login',
    },
    order: {
        submit_preview: _api_root + 'cart/cart2',
        // submit: _api_root + 'goods/submit',
        submit: _api_root + 'cart/cart3',
        pay_data: _api_root + 'order/payData',
        list: _api_root + 'order/orderList',
        revoke: _api_root + 'order/cancelOrder',
        // 删除已取消订单（真删除）
        orderDelete: _api_root + 'order/orderDelete',
        // 删除已完成订单（软删除）
        delOrder: _api_root + 'order/delOrder',
        confirm: _api_root + 'order/orderConfirm',
        count_data: _api_root + 'order/count-data',
        detail: _api_root + 'order/orderDetail',
        refund_preview: _api_root + 'order/refund-preview',
        refund: _api_root + 'order/refund',
        refund_detail: _api_root + 'order/refund-detail',
    },
    user: {
        user_info: _api_root + 'user/wxUserInfo',
        address_list: _api_root + 'user/addressList',
        address_detail: _api_root + 'user/addressDetail',
        allAddress: _api_root + 'user/allAddress',
        address_save: _api_root + 'user/addressSave',
        address_set_default: _api_root + 'user/addressSetDefault',
        address_delete: _api_root + 'user/addressDelete',
        save_form_id: _api_root + "user/save-form-id",
        favorite_add: _api_root + "user/favorite-add",
        favorite_remove: _api_root + "user/favorite-remove",
        favorite_list: _api_root + "user/favorite-list",
        decodePhoneNum:_api_root+"user/decodeEncryptedData",
        withdrawalsList: _api_root + "user/withdrawalsList",
        withdrawalsDetail: _api_root + "user/withdrawalsDetail",
        userQrcode: _api_root + "user/userQrcode",
    },
};
module.exports = api;